//
// Created by liushuai on 2021/1/10.
//

#include "searchInsert.h"
<<<<<<< HEAD:cxx/algorithm/src/searchInsert.cc
//warning
int searchInsert(std::vector<int>& nums, int target) {
    int result= 0;
    if(nums.size() == 0)
        return 0;
    while (nums[result]<target&&result<nums.size()){
        result++;
    }
    return result;

=======
// warning
int searchInsert(std::vector<int>& nums, int target) {
  int result = 0;
  if (nums.size() == 0) return 0;
  while (nums[result] < target && result < nums.size()) {
    result++;
  }
  return result;
>>>>>>> dev:cxx/algorithm/common/src/searchInsert.cc
}